Optimal. Leaf size=79 \[ -\frac {1}{2} c^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}-\frac {b c \left (a+b \tan ^{-1}(c x)\right )}{x}-\frac {1}{2} b^2 c^2 \log \left (c^2 x^2+1\right )+b^2 c^2 \log (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {4852, 4918, 266, 36, 29, 31, 4884} \[ -\frac {1}{2} c^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}-\frac {b c \left (a+b \tan ^{-1}(c x)\right )}{x}-\frac {1}{2} b^2 c^2 \log \left (c^2 x^2+1\right )+b^2 c^2 \log (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 266
Rule 4852
Rule 4884
Rule 4918
Rubi steps
\begin {align*} \int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{x^3} \, dx &=-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}+(b c) \int \frac {a+b \tan ^{-1}(c x)}{x^2 \left (1+c^2 x^2\right )} \, dx\\ &=-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}+(b c) \int \frac {a+b \tan ^{-1}(c x)}{x^2} \, dx-\left (b c^3\right ) \int \frac {a+b \tan ^{-1}(c x)}{1+c^2 x^2} \, dx\\ &=-\frac {b c \left (a+b \tan ^{-1}(c x)\right )}{x}-\frac {1}{2} c^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}+\left (b^2 c^2\right ) \int \frac {1}{x \left (1+c^2 x^2\right )} \, dx\\ &=-\frac {b c \left (a+b \tan ^{-1}(c x)\right )}{x}-\frac {1}{2} c^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}+\frac {1}{2} \left (b^2 c^2\right ) \operatorname {Subst}\left (\int \frac {1}{x \left (1+c^2 x\right )} \, dx,x,x^2\right )\\ &=-\frac {b c \left (a+b \tan ^{-1}(c x)\right )}{x}-\frac {1}{2} c^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}+\frac {1}{2} \left (b^2 c^2\right ) \operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )-\frac {1}{2} \left (b^2 c^4\right ) \operatorname {Subst}\left (\int \frac {1}{1+c^2 x} \, dx,x,x^2\right )\\ &=-\frac {b c \left (a+b \tan ^{-1}(c x)\right )}{x}-\frac {1}{2} c^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}+b^2 c^2 \log (x)-\frac {1}{2} b^2 c^2 \log \left (1+c^2 x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 90, normalized size = 1.14 \[ -\frac {a^2+2 b \tan ^{-1}(c x) \left (a c^2 x^2+a+b c x\right )+2 a b c x-2 b^2 c^2 x^2 \log (x)+b^2 c^2 x^2 \log \left (c^2 x^2+1\right )+b^2 \left (c^2 x^2+1\right ) \tan ^{-1}(c x)^2}{2 x^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.51, size = 94, normalized size = 1.19 \[ -\frac {b^{2} c^{2} x^{2} \log \left (c^{2} x^{2} + 1\right ) - 2 \, b^{2} c^{2} x^{2} \log \relax (x) + 2 \, a b c x + {\left (b^{2} c^{2} x^{2} + b^{2}\right )} \arctan \left (c x\right )^{2} + a^{2} + 2 \, {\left (a b c^{2} x^{2} + b^{2} c x + a b\right )} \arctan \left (c x\right )}{2 \, x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 110, normalized size = 1.39 \[ -\frac {a^{2}}{2 x^{2}}-\frac {b^{2} \arctan \left (c x \right )^{2}}{2 x^{2}}-\frac {c \,b^{2} \arctan \left (c x \right )}{x}-\frac {c^{2} b^{2} \arctan \left (c x \right )^{2}}{2}+c^{2} b^{2} \ln \left (c x \right )-\frac {b^{2} c^{2} \ln \left (c^{2} x^{2}+1\right )}{2}-\frac {a b \arctan \left (c x \right )}{x^{2}}-\frac {a b c}{x}-c^{2} a b \arctan \left (c x \right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 98, normalized size = 1.24 \[ -{\left ({\left (c \arctan \left (c x\right ) + \frac {1}{x}\right )} c + \frac {\arctan \left (c x\right )}{x^{2}}\right )} a b + \frac {1}{2} \, {\left ({\left (\arctan \left (c x\right )^{2} - \log \left (c^{2} x^{2} + 1\right ) + 2 \, \log \relax (x)\right )} c^{2} - 2 \, {\left (c \arctan \left (c x\right ) + \frac {1}{x}\right )} c \arctan \left (c x\right )\right )} b^{2} - \frac {b^{2} \arctan \left (c x\right )^{2}}{2 \, x^{2}} - \frac {a^{2}}{2 \, x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.31, size = 140, normalized size = 1.77 \[ b^2\,c^2\,\ln \relax (x)-\frac {a^2}{2\,x^2}-\frac {b^2\,c^2\,{\mathrm {atan}\left (c\,x\right )}^2}{2}-\frac {b^2\,c^2\,\ln \left (c\,x+1{}\mathrm {i}\right )}{2}-\frac {b^2\,c^2\,\ln \left (1+c\,x\,1{}\mathrm {i}\right )}{2}-\frac {b^2\,{\mathrm {atan}\left (c\,x\right )}^2}{2\,x^2}-\frac {a\,b\,c}{x}-\frac {a\,b\,\mathrm {atan}\left (c\,x\right )}{x^2}-\frac {b^2\,c\,\mathrm {atan}\left (c\,x\right )}{x}-\frac {a\,b\,c^2\,\ln \left (c\,x+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2}+\frac {a\,b\,c^2\,\ln \left (1+c\,x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.02, size = 119, normalized size = 1.51 \[ \begin {cases} - \frac {a^{2}}{2 x^{2}} - a b c^{2} \operatorname {atan}{\left (c x \right )} - \frac {a b c}{x} - \frac {a b \operatorname {atan}{\left (c x \right )}}{x^{2}} + b^{2} c^{2} \log {\relax (x )} - \frac {b^{2} c^{2} \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{2} - \frac {b^{2} c^{2} \operatorname {atan}^{2}{\left (c x \right )}}{2} - \frac {b^{2} c \operatorname {atan}{\left (c x \right )}}{x} - \frac {b^{2} \operatorname {atan}^{2}{\left (c x \right )}}{2 x^{2}} & \text {for}\: c \neq 0 \\- \frac {a^{2}}{2 x^{2}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________